//
//  AGLContentCollectionCell.m
//  滴滴快拍
//
//  Created by dllo on 16/5/19.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "AGLContentCollectionCell.h"


@implementation AGLContentCollectionCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
//        [self createData];
    }
    return self;
}
- (void)setCategoryId:(NSNumber *)categoryId {
    if (_categoryId != categoryId) {
        _categoryId = categoryId;
    }
    [self createData];
}
- (void)createData {
    self.aglContentView.categoryId = self.categoryId;
}


- (void)createView {
    self.aglContentView = [[AGLContentView alloc] initWithFrame:self.contentView.frame];
//    self.aglContentView.frame = self.contentView.frame;

    [self.contentView addSubview:self.aglContentView];
}

- (void)layoutSubviews {
    [super layoutSubviews];
//    self.aglContentView.frame = self.contentView.frame;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
